<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style>
		
	</style>
</head>
<body>
	<button onclick="t1 = setInterval(start,1000)">开始</button>
	<div id="box">10</div>
</body>
	<script>
		var m =10;
		function start(){
			var div = document.getElementById("box");

			m--;

			div.innerHTML = m;

			if(m<=0)
			{
				clearInterval(t1);
			}
		}
	</script>
</html>